package com.biz.primus.model.coupon.vo.coupon;

import com.biz.primus.base.exception.utils.AssertUtils;
import com.biz.primus.model.coupon.exceptions.CouponExceptionType;
import com.biz.primus.model.coupon.interfaces.IModelValidation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;

/**
 * 获取订单商品可用优惠券商品Vo
 *
 * @author david-liu
 */
@Getter
@Setter
@ApiModel(value = "获取订单商品可用优惠券商品Vo")
public class GetOrderProductAvailableCouponProductItemVo implements Serializable, IModelValidation {
    private static final long serialVersionUID = -4112990977931224062L;

    @ApiModelProperty(value = "商品ID")
    private Long productId;

    @ApiModelProperty(value = "商品分类ID")
    private Long categoryId;

    @ApiModelProperty(value = "商品品牌ID")
    private Long brandId;

    @ApiModelProperty(value = "商家ID")
    private Long vendorId;

    @ApiModelProperty(value = "商品金额小计")
    private Integer subTotal;

    @Override
    public void validate() {
        AssertUtils.notNull(productId, CouponExceptionType.GET_ORDER_PRODUCT_COUPON_PRODUCT_ID_NOT_ALLOW_NULL);
    }
}
